<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
		      var number=0;
		      var string=0;
		      var other=0;
		      var a="48s*d`f4中国";
			  
		      for(var i=0;i<a.length;i++){
				  var item = a[i];
				 if(/[a-z]/i.test(a[i])){
					string++;
				}else if(/[0-9]/.test(a[i])){
					number++;
				}else{
					other++;
				}
		      }
		      document.write("字母个数:"+string+"<br />"  +"数字个数:"+number+"<br />");
		      document.write("其他个数:"+other+"<br />"  );
			  
		    </script>
	</body>
</html>
